package com.eboss.sbs.activity.base;

import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.Toast;

import com.baidu.location.BDLocation;
import com.umeng.analytics.MobclickAgent;

public class BaseActivity extends RootActivity {

	protected boolean isImmersiveNotification = true;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		if(isImmersiveNotification){mApp.showImmersiveNotification(mActivity);}
	}
	
	public void toast(String msg) {
		Toast toast = Toast.makeText(mActivity, msg, Toast.LENGTH_SHORT);
		toast.setGravity(Gravity.CENTER, 0, 0);
		toast.show();
	}

	@Override
	public void onClick(View arg0) {}
	
	@Override
	public void onReceiveLocation(BDLocation arg0) {
		mApp.locationClient.stop();
	}
	
	@Override
	protected void onDestroy() {
		super.onDestroy();
	}

	@Override
	protected void onPause() {
		super.onPause();
		MobclickAgent.onPause(mActivity);
	}

	@Override
	protected void onResume() {
		super.onResume();
		MobclickAgent.onResume(mActivity);
	}

}
